package component;

import java.util.HashMap;
import java.util.Map;

public class Radio {
	private String id;
	private String name;
	private String text;
	private String checked;
	private String reg;
	private String tip;
	private String value;
	public Radio(String id, String name, String text, String checked,
			String reg, String tip, String value) {
		this.id = id;
		this.name = name;
		this.text = text;
		this.checked = checked;
		this.reg = reg;
		this.tip = tip;
		this.value = value;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	@Override
	public String toString() {
		Map<String, String> attries = new HashMap<String, String>();
		attries.put("type", "radio");
		attries.put("id", id);
		attries.put("name", id);
		attries.put("checked", checked);
		attries.put("value", value);
		Tag checkbox = new Tag("input");
		checkbox.setAttribute(attries);
		checkbox.setText(text);
		return checkbox.toString();
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public String getChecked() {
		return checked;
	}
	public void setChecked(String checked) {
		this.checked = checked;
	}
	public String getReg() {
		return reg;
	}
	public void setReg(String reg) {
		this.reg = reg;
	}
	public String getTip() {
		return tip;
	}
	public void setTip(String tip) {
		this.tip = tip;
	}
	public Radio(String id, String name, String text, String checked,
			String reg, String tip) {
		this.id = id;
		this.name = name;
		this.text = text;
		this.checked = checked;
		this.reg = reg;
		this.tip = tip;
	}

}
